package org.openlab.webapp;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.nio.SelectChannelConnector;
import org.eclipse.jetty.webapp.WebAppContext;

public class WebServer {
	
    public static void main( String[] args ) {
        Server server = new Server();
        SelectChannelConnector connector = new SelectChannelConnector();
        connector.setPort(80);
        server.addConnector(connector);
        
        WebAppContext context = new WebAppContext();
        context.setContextPath("/");
        context.setWar("src/main/webapp");
        server.setHandler(context);
        try {
	        server.start();
	        server.join();
        } catch (Exception e) {
        	e.printStackTrace();
        	return;
        }
    }
}
